import org.apache.ibatis.session.SqlSession;

import java.io.IOException;
import com.entity.User;
import com.mapper.UserMapper;
import com.util.MybatiesUtil;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import java.io.IOException;


/**
 * Created by webrx on 2017/6/17.
 */
public class DomUser {
    @Test
    public void show() throws IOException {
        SqlSession ss=new MybatiesUtil().getSession();
        UserMapper use= ss.getMapper(UserMapper.class);


        User uu = new User();
        uu.setPassword("1234565");
        uu.setGender("男");
        uu.setName("two");
       int nn=use.add(uu);
       ss.commit();
        System.out.println(nn);
    }

}
